<template>
    <div>
      <j-modal
      title="回复"
      switchFullscreen
      :visible="visible"  
      @ok="hfhandleOk"
      @cancel="hfhandleCancel"
      :footer="false"
      :width="1000"
      >
      <!-- 查询功能 -->
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery" :form="queryform">
        <a-row :gutter="24">
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="昵称">
              <a-input placeholder="请输入帖子标题" v-decorator="['toName']"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="回复时间">
              <a-date-picker valueFormat='YYYY-MM-DD'  v-decorator="['createTime']" />
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
     
      </a-form>
    </div>


      <div>
        <a-table
        bordered
        rowKey="id"
        :columns="columns" 
        :dataSource="parentlist.records"
        :pagination="ipagination"
       >

       </a-table>
      </div>
      </j-modal>
    </div>
</template>

<script>
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
    export default {
      mixins:[JeecgListMixin],
        name:'hfModal',
        props:{
            parentlist:{
                require:true
            }
        },
        data(){
            return{
                visible:false,
                queryform:this.$form.createForm(this),//搜索表单
                columns:[
                    {
                    title:'头像',
                    dataIndex:'toAvatar',
                    algin:'center'
                    },
                    {
                        title:'昵称',
                        dataIndex:'toName',
                        algin:'center'
                    },
                    {
                        title:'回复时间',
                        dataIndex:'createTime',
                        algin:'center'
                    },
                    {
                        title:'回复内容',
                        dataIndex:'cover',
                        algin:'center' 
                    }
                ]
            }
        },
        methods:{
            hfhandleOk()
            {
                this.visible = false
            },
            hfhandleCancel(){
                this.visible = false
            },
            searchQuery(){
                const params = this.queryform.getFieldsValue(['toName','createTime'])
               this.$emit('searchback',params)
            },
            searchReset(){
                this.queryform.resetFields()
                this.$emit('searchback')
            }
        }
    }
</script>

<style lang="less" scoped>

</style>